package org.arch_learn.spring_cloud.scn_homework.service_code_8081.feign.client;

import org.arch_learn.spring_cloud.scn_homework.service_code_8081.feign.fallback.EmailFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "service-email", path = "/email", fallback = EmailFeignClientFallback.class)
public interface EmailFeignClient {
    @PostMapping("/{email}/{code}")
    ResponseEntity<Boolean> sendEmail(@PathVariable String email,
                                      @PathVariable String code);
}
